/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac2.client;

/**
 *
 * @author jbonet
 */
public class PntlGestionMatriculas extends javax.swing.JFrame {

    /**
     * Creates new form GestionarMatriculaCurso
     */
    public PntlGestionMatriculas() {
        initComponents();
        super.setLocationRelativeTo(null);
    }

    @Override
    public java.awt.Image getIconImage() {
        java.awt.Image retValue = java.awt.Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("resources/logo.png"));     
        return retValue;
    }    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlTablaMatriculas = new javax.swing.JPanel();
        scrpnTabla = new javax.swing.JScrollPane();
        tblListaMatriculas = new javax.swing.JTable();
        pnlBotonera = new javax.swing.JPanel();
        btnAlta = new javax.swing.JButton();
        btnBaja = new javax.swing.JButton();
        btnCambio = new javax.swing.JButton();
        btnSalir = new javax.swing.JButton();
        pnlFiltro = new javax.swing.JPanel();
        lblFiltro = new javax.swing.JLabel();
        cmbCurso = new javax.swing.JComboBox();
        cmbTurno = new javax.swing.JComboBox();
        btnFiltrar = new javax.swing.JButton();
        lblCurso = new javax.swing.JLabel();
        lblTurno = new javax.swing.JLabel();
        lblAlumno = new javax.swing.JLabel();
        txtAlumno = new javax.swing.JTextField();
        cmbTurno2 = new javax.swing.JComboBox();
        lblEstado = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Gestión de Matrículas");
        setIconImage(getIconImage());
        setName("frmGestionMatriculas"); // NOI18N
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        tblListaMatriculas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Finn el Humano", "Estadística", "Aceptada", "Mañana"},
                {"Jake el Perro", "Ingeniería del Software", "Pendiente", "Tarde"},
                {"Princesa Chicle", "Ténicas de Desarrollo del Software", "Aceptada", "Mañana"},
                {"Señor Almidón", "Diseño de Interfaces", "Pendiente", "Mañana"}
            },
            new String [] {
                "Alumno", "Curso", "Estado", "Turno"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        scrpnTabla.setViewportView(tblListaMatriculas);
        tblListaMatriculas.getColumnModel().getColumn(0).setPreferredWidth(200);
        tblListaMatriculas.getColumnModel().getColumn(1).setPreferredWidth(200);

        pnlBotonera.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnAlta.setText("Alta");

        btnBaja.setText("Baja");

        btnCambio.setText("Cambio");

        btnSalir.setText("Salir");

        org.jdesktop.layout.GroupLayout pnlBotoneraLayout = new org.jdesktop.layout.GroupLayout(pnlBotonera);
        pnlBotonera.setLayout(pnlBotoneraLayout);
        pnlBotoneraLayout.setHorizontalGroup(
            pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBotoneraLayout.createSequentialGroup()
                .add(18, 18, 18)
                .add(btnAlta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(btnCambio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(btnBaja, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(btnSalir, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(18, 18, 18))
        );
        pnlBotoneraLayout.setVerticalGroup(
            pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBotoneraLayout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnAlta)
                    .add(btnCambio)
                    .add(btnBaja)
                    .add(btnSalir))
                .addContainerGap())
        );

        pnlFiltro.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblFiltro.setBackground(new java.awt.Color(0, 255, 204));
        lblFiltro.setText("Filtro de búsqueda");
        lblFiltro.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 204)));
        lblFiltro.setOpaque(true);

        cmbCurso.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estadística", "Diseño de Interfaces", "Técnicas de Desarrollo del Software" }));

        cmbTurno.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mañana", "Tarde" }));

        btnFiltrar.setText("Filtrar");

        lblCurso.setText("Curso");

        lblTurno.setText("Turno");

        lblAlumno.setText("Alumno");

        cmbTurno2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Aceptada", "Pendiente", "Denegada" }));

        lblEstado.setText("Estado");

        org.jdesktop.layout.GroupLayout pnlFiltroLayout = new org.jdesktop.layout.GroupLayout(pnlFiltro);
        pnlFiltro.setLayout(pnlFiltroLayout);
        pnlFiltroLayout.setHorizontalGroup(
            pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(lblFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(pnlFiltroLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(lblCurso)
                    .add(cmbCurso, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 139, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(pnlFiltroLayout.createSequentialGroup()
                        .add(lblAlumno)
                        .add(0, 142, Short.MAX_VALUE))
                    .add(txtAlumno))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(cmbTurno2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 111, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(lblEstado))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(pnlFiltroLayout.createSequentialGroup()
                        .add(cmbTurno, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 98, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(18, 18, 18)
                        .add(btnFiltrar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(lblTurno))
                .add(20, 20, 20))
        );
        pnlFiltroLayout.setVerticalGroup(
            pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlFiltroLayout.createSequentialGroup()
                .add(lblFiltro)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(lblCurso)
                    .add(lblTurno)
                    .add(lblAlumno)
                    .add(lblEstado))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cmbCurso, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cmbTurno, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btnFiltrar)
                    .add(txtAlumno, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cmbTurno2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout pnlTablaMatriculasLayout = new org.jdesktop.layout.GroupLayout(pnlTablaMatriculas);
        pnlTablaMatriculas.setLayout(pnlTablaMatriculasLayout);
        pnlTablaMatriculasLayout.setHorizontalGroup(
            pnlTablaMatriculasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlTablaMatriculasLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlTablaMatriculasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(pnlFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(scrpnTabla)
                    .add(pnlBotonera, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlTablaMatriculasLayout.setVerticalGroup(
            pnlTablaMatriculasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlTablaMatriculasLayout.createSequentialGroup()
                .addContainerGap()
                .add(scrpnTabla, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlBotonera, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        getContentPane().add(pnlTablaMatriculas);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PntlGestionMatriculas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PntlGestionMatriculas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PntlGestionMatriculas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PntlGestionMatriculas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PntlGestionMatriculas().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAlta;
    private javax.swing.JButton btnBaja;
    private javax.swing.JButton btnCambio;
    private javax.swing.JButton btnFiltrar;
    private javax.swing.JButton btnSalir;
    private javax.swing.JComboBox cmbCurso;
    private javax.swing.JComboBox cmbTurno;
    private javax.swing.JComboBox cmbTurno2;
    private javax.swing.JLabel lblAlumno;
    private javax.swing.JLabel lblCurso;
    private javax.swing.JLabel lblEstado;
    private javax.swing.JLabel lblFiltro;
    private javax.swing.JLabel lblTurno;
    private javax.swing.JPanel pnlBotonera;
    private javax.swing.JPanel pnlFiltro;
    private javax.swing.JPanel pnlTablaMatriculas;
    private javax.swing.JScrollPane scrpnTabla;
    private javax.swing.JTable tblListaMatriculas;
    private javax.swing.JTextField txtAlumno;
    // End of variables declaration//GEN-END:variables
}
